Back

Contents

For both the Jetson and rpi:

Base package installation and setup

$ curl -sfL https://get.k3s.io | sh -

Edit the hostname to something sensible:

$ sudo vim /etc/hostname

Edit /etc/hosts to include the worker head and worker nodes.

Rpi4

Install helm:

$ snap install helm

Need to set up cgroups:

$ sudo vim /boot/firmware/cmdline.txt

at the end of the file add:

cgroup_enable=memory cgroup_memory=1

reboot and repeat for each of your nodes.

Aliases

Edit bash aliases:

$ sudo vi ~/.bash_aliases

and add:

alias kubectl="sudo k3s kubectl"
alias helm="sudo helm --kubeconfig=/etc/rancher/k3s/k3s.yaml"
alias temp="sudo echo CPU `vcgencmd measure_temp | awk -F = '{ print $2 }' | awk -F \' '{ print $1 }'`°C"

Jetson

Temperature control and monitoring

Install the fan controller:

$ git clone https://github.com/Pyrestone/jetson-fan-ctl.git ~/

Install the temperature monitor:

$ git clone https://github.com/MartinMatta/Jetson-Nano-temperature ~/
$ chmod 755 Jetson-Nano-temperature/temp.sh

Aliases

Edit bash aliases:

$ sudo vi ~/.bash_aliases

and add:

alias temp="bash -c ~/Jetson-Nano-temperature/temp.sh"

Master

To add a worker node

Get the node token:

$ sudo cat /var/lib/rancher/k3s/server/node-token

Worker nodes

To join a cluster

$ curl -sfL https://get.k3s.io | K3S_URL=https://srv1-rpi4-1:6443 K3S_TOKEN=<node-token> sh -

Top